/**
 * Created by Superlee on 2016/5/31.
 */
var loginModule=angular.module('LoginModule',[]);

loginModule.controller('LoginCtrl',['$scope','$state',function($scope,$state){
    $scope.login=function(){
        $.post('/education/login.action',{
            account:$scope.loginInfo.username,
            password:$scope.loginInfo.password
        },function(data){
            $state.go('mainPage',{role:data.role});
        });
    }
}]);

loginModule.controller('RegisterCtrl',['$scope',function($scope){

}]);

var mainPageModule=angular.module('MainPageModule',[]);

mainPageModule.controller('QueryStuInfoCtrl',['$scope','$state',function($scope,$state){
    $scope.queryStuInfo=function(){
        $.post('/education/administrator/queryStuInfo.action',$scope.queryInfo,function(data){
            console.log(data);
            $scope.stus=data;
            $scope.$apply($scope.stus);
            $state.go('mainPage.content.result',{name:'queryStuInfo'});

        })
    }
}]);

// mainPageModule.controller('MainPageCtrl',['$scope',function($scope){
//
// }]);
